Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODDraft


AcquirePersistentObject

The AcquirePersistentObject method returns a reference to the part or frame with the specified scripting ID.

ODPersistentObject AcquirePersistentObject (
                        in ODPersistentObjectID objectID, 
                        out ODObjectType objectType);
objectID
The scripting ID of the desired object.
objectType
The type of the object returned, either part (kODPartObject) or frame (kODFrameObject).
return value
A reference to the part or frame with the specified scripting ID.
DISCUSSION
You call this method to obtain a reference to a part or frame, given the ID that identifies it for scripting purposes. This method should be used only for scripting.

This method increments the reference count of the returned persistent object. When you have finished using that persistent object, you should call its Release method.

EXCEPTIONS
kODErrIllegalNullIDInput
The objectID parameter is null.
kODErrInvalidPersistentObjectID
This draft has no persistent object with the specified ID, or the object is of a type that cannot be acquired.
SEE ALSO
The ODObjectType type (page 903).
The ODPersistentObjectID type (page 900).
The ODDraft::GetPersistentObjectID method (page 174).
"Default Object Accessors" on page 421 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help